Acala

Row

Components of Total Value Locked: Acala

Row

Overall Total Value Locked (TVL) for Acala

  • The Overall TVL in the table below does not includes the Crowdloan TVL, which also seems to be the case on the https://stats.acala.network page.
Date Block dexTVL bridgeTVL liquidStakingTVL crowdloanTVL LPTokenStakingTVL lcdotTVL stableCoinTVL OverallTVL
2022-02-10 382,658 0 41,662,000 0.00 677,340,384 12,859,946 502,363,724 7,341,784 564,227,454
2022-02-11 389,478 16,094,236 37,830,000 0.00 615,039,766 16,981,773 456,157,162 17,382,712 544,445,883
2022-02-12 396,298 17,016,890 37,668,000 0.00 612,405,972 17,499,952 454,203,753 18,165,975 544,554,569
2022-02-13 403,080 16,954,608 37,406,000 0.00 608,146,378 17,607,851 451,044,536 18,378,380 541,391,374
2022-02-14 409,851 16,790,368 37,522,000 0.00 610,032,305 17,696,564 452,443,273 18,606,109 543,058,314
2022-02-15 416,618 17,201,570 40,278,000 0.00 654,839,326 17,829,240 485,675,341 22,576,976 583,561,128
2022-02-16 423,364 19,156,534 39,948,000 0.00 649,474,189 20,650,471 481,696,175 25,420,112 586,871,292
2022-02-17 429,431 18,765,765 36,338,000 0.00 590,782,845 19,849,904 438,166,507 24,404,858 537,525,033
2022-02-18 435,379 18,569,217 35,644,000 0.00 579,499,800 19,835,430 429,798,199 24,337,215 528,184,062
2022-02-19 441,244 18,878,530 35,676,000 0.00 580,020,055 19,740,153 430,184,058 24,803,661 529,282,402
2022-02-20 447,046 19,023,121 34,268,000 0.00 557,128,805 19,973,860 413,206,281 30,189,557 516,660,820
2022-02-21 452,805 20,067,041 32,490,000 0.00 528,222,099 20,531,419 391,767,015 30,621,759 495,477,234
2022-02-22 458,591 19,701,249 32,654,000 0.00 530,888,409 20,302,879 393,744,540 30,963,722 497,366,390
2022-02-23 464,375 19,537,419 32,126,000 0.00 522,304,190 19,901,682 387,377,874 30,455,664 489,398,640
2022-02-24 470,299 18,494,709 31,932,000 0.00 519,150,140 19,256,956 385,038,607 30,264,104 484,986,376
2022-02-25 476,519 19,319,181 34,484,000 0.00 560,640,531 20,215,913 415,810,826 32,588,262 522,418,182
2022-02-26 483,026 19,450,986 36,006,000 0.00 585,385,192 20,814,561 434,163,224 34,170,399 544,605,170
2022-02-27 489,670 19,361,671 34,862,000 0.00 566,786,051 20,421,553 420,368,781 33,081,046 528,095,051
2022-02-28 496,214 19,375,345 37,584,000 0.00 611,040,301 21,454,201 453,190,874 35,851,414 567,455,834
2022-03-01 502,741 19,797,112 37,738,000 0.00 613,544,031 21,846,985 455,047,818 36,068,245 570,498,160
2022-03-02 509,328 19,714,554 37,294,000 0.00 606,325,483 21,809,479 449,694,031 35,875,337 564,387,401
2022-03-03 515,915 21,601,531 36,096,000 0.00 586,848,411 22,767,995 435,248,451 62,551,692 578,265,670
2022-03-04 522,577 21,109,933 33,526,000 0.00 545,065,377 21,782,568 404,259,186 62,448,822 543,126,509
2022-03-05 529,288 21,046,495 34,594,000 0.00 562,428,910 22,337,883 417,137,215 65,629,199 560,744,792
2022-03-06 535,942 21,517,523 34,130,000 0.00 554,885,203 22,085,828 411,542,266 64,244,858 553,520,476
2022-03-07 542,760 20,698,881 32,756,000 0.00 532,546,724 21,700,357 394,974,464 61,806,180 531,935,883
2022-03-08 549,653 21,426,517 33,786,000 0.00 549,292,454 22,176,760 407,394,287 62,804,874 547,588,438
2022-03-09 556,567 22,187,048 35,432,000 0.00 576,053,106 22,948,291 427,241,886 67,566,345 575,375,570
2022-03-10 563,674 21,797,345 34,072,000 0.00 553,942,239 22,297,969 410,842,898 64,484,996 553,495,208
2022-03-11 570,668 22,623,490 35,698,000 0.00 580,377,731 22,701,836 430,449,335 65,532,242 577,004,904
2022-03-12 577,693 23,152,676 36,542,000 0.00 594,099,475 23,793,862 440,626,355 67,263,520 591,378,413
2022-03-13 584,752 22,686,501 34,726,000 0.00 564,574,965 23,082,152 418,728,882 64,046,341 563,269,876
2022-03-14 591,860 22,701,522 35,342,000 0.00 574,589,887 23,759,257 426,156,659 69,433,042 577,392,480
2022-03-15 598,871 23,036,986 35,672,000 0.00 579,955,023 23,646,099 430,135,825 67,957,199 580,448,109
2022-03-16 605,882 23,921,422 37,984,000 0.00 617,543,497 24,473,523 458,014,106 71,306,499 615,699,551
2022-03-17 612,917 22,161,063 37,460,000 0.00 609,024,310 22,408,882 451,695,672 70,199,287 603,924,904
2022-03-18 620,006 22,438,611 38,024,000 0.00 618,193,816 22,816,787 458,496,429 72,350,849 614,126,677
2022-03-19 627,056 22,353,285 38,728,000 0.00 629,639,441 23,107,153 466,985,317 75,180,260 626,354,016
2022-03-20 634,100 22,073,101 37,390,000 0.00 607,886,250 22,613,059 450,851,607 73,690,440 606,618,206
2022-03-21 641,175 22,291,249 37,496,000 0.00 609,609,597 22,855,693 452,129,763 77,140,785 611,913,491
2022-03-22 648,244 23,278,446 40,526,000 0.00 658,871,307 24,075,593 488,665,745 78,792,353 655,338,137
2022-03-23 655,070 23,461,611 41,664,000 0.00 677,372,900 24,188,169 502,387,840 81,244,807 672,946,427
2022-03-24 661,932 21,153,952 42,586,000 0.00 692,362,767 21,782,899 513,505,390 83,431,449 682,459,690
2022-03-25 668,922 21,306,124 41,092,000 0.00 668,073,330 21,459,150 495,490,618 79,385,632 658,733,524
2022-03-26 675,883 21,542,172 41,658,000 0.00 677,275,352 21,883,262 502,315,491 82,516,037 669,914,963
2022-03-27 682,919 23,079,423 44,528,000 0.00 723,935,784 23,294,929 536,922,181 86,241,201 714,065,733
2022-03-28 689,974 23,409,978 44,534,000 0.00 724,033,332 23,605,668 536,994,529 87,643,336 716,187,512
2022-03-29 697,050 23,591,321 44,294,000 0.00 720,131,414 23,675,358 534,100,590 89,331,651 714,992,920
2022-03-30 704,068 23,857,058 45,036,000 0.00 732,194,843 24,050,814 543,047,685 92,283,577 728,275,134
2022-03-31 711,104 23,395,737 42,972,000 0.00 698,638,351 23,720,373 518,159,808 96,421,301 704,669,220
2022-04-01 718,140 23,701,108 43,878,000 0.00 713,368,090 24,315,051 529,084,429 104,794,678 725,773,266
2022-04-02 725,135 24,887,333 45,910,000 0.00 746,404,326 25,420,495 553,586,447 110,536,827 760,341,102
2022-04-03 732,169 24,976,394 46,504,000 0.00 756,061,572 25,676,763 560,748,947 109,398,237 767,304,341
2022-04-04 739,232 24,915,365 45,238,000 0.00 735,478,957 25,766,211 545,483,417 114,607,746 756,010,740
2022-04-05 746,312 24,464,193 44,110,000 0.00 717,139,944 25,349,733 531,881,903 112,332,392 738,138,221
2022-04-06 753,339 23,335,329 39,880,000 0.00 648,368,646 23,577,454 480,876,225 98,378,537 666,047,546
2022-04-07 760,400 23,441,333 40,698,000 0.00 661,667,682 23,987,465 490,739,735 104,512,956 683,379,489
2022-04-08 767,454 23,329,475 38,616,000 0.00 627,818,546 23,211,996 465,634,812 97,358,875 648,151,160
2022-04-09 774,447 23,552,480 39,236,000 0.00 637,898,500 23,724,436 473,110,822 102,638,645 662,262,382
2022-04-10 781,545 23,609,472 39,172,000 0.00 636,857,989 24,104,843 472,339,105 108,925,810 668,151,229
2022-04-11 788,553 22,497,741 34,518,000 0.00 561,193,303 22,129,748 416,220,801 95,815,282 591,181,572
2022-04-12 795,620 22,429,761 35,566,000 0.00 578,231,676 22,377,307 428,857,669 95,523,923 604,754,660
2022-04-13 802,608 22,989,411 36,390,000 0.00 591,628,260 22,896,487 438,793,527 99,176,405 620,245,829
2022-04-14 809,644 23,399,894 35,830,000 0.00 582,523,786 22,857,382 432,041,002 96,065,859 610,194,137
2022-04-15 816,668 23,280,552 36,614,000 0.00 595,270,050 22,919,057 441,494,537 98,171,487 622,479,633
2022-04-16 823,732 23,117,546 37,270,000 0.00 605,935,292 23,330,616 449,404,637 103,152,932 636,275,732
2022-04-17 830,766 23,167,619 35,584,000 0.00 578,524,320 22,884,413 429,074,714 98,611,872 609,322,619
2022-04-18 837,826 23,230,902 36,382,000 0.00 591,498,196 23,022,673 438,697,062 95,405,181 616,737,818
2022-04-19 844,870 23,931,360 37,750,000 0.00 613,739,127 23,872,544 455,192,515 98,350,575 639,096,995
2022-04-20 851,796 24,071,604 38,196,000 0.00 620,990,190 23,866,194 460,570,419 97,073,865 643,778,082
2022-04-21 858,830 23,832,440 36,368,000 0.00 591,270,585 23,481,671 438,528,249 94,872,285 617,082,645
2022-04-22 865,842 24,221,077 36,652,000 0.00 595,887,854 23,563,965 441,952,744 92,765,978 619,155,764
2022-04-23 872,830 24,054,342 37,652,000 0.00 612,145,844 23,786,452 454,010,823 91,038,073 630,541,691
2022-04-24 879,807 23,898,657 36,488,000 0.00 593,221,543 23,181,231 439,975,218 85,704,047 609,247,154
2022-04-25 886,715 23,237,058 36,294,000 0.00 590,067,493 23,032,354 437,635,951 86,257,029 606,456,393
2022-04-26 893,713 22,897,882 33,242,000 0.00 540,448,107 21,606,459 400,834,691 79,312,452 557,893,484
2022-04-27 900,680 22,972,638 33,832,000 0.00 550,040,322 21,905,632 407,948,958 80,635,836 567,295,065
2022-04-28 907,463 22,683,419 33,962,000 0.00 552,153,860 21,915,225 409,516,509 82,101,429 570,178,582
2022-04-29 914,420 21,562,000 32,254,000 0.00 524,385,213 21,083,198 388,921,308 76,937,998 540,758,504
2022-04-30 921,375 20,113,100 29,036,000 0.00 472,067,001 19,512,552 350,118,407 70,866,527 489,646,586
2022-05-01 928,262 20,315,368 30,704,000 0.00 499,185,329 19,960,327 370,231,284 72,475,060 513,686,040
2022-05-02 935,210 20,209,506 29,986,000 0.00 487,512,092 19,649,879 361,573,583 70,661,182 502,080,151
2022-05-03 941,991 20,104,425 29,408,000 0.00 478,114,973 19,671,442 354,604,013 71,190,161 494,978,041
2022-05-04 948,773 20,989,523 32,496,000 0.00 528,319,647 20,874,165 391,839,364 79,907,714 546,106,766
2022-05-05 955,553 19,749,098 28,805,352 0.00 472,424,677 19,364,033 350,383,685 70,122,361 488,424,529
2022-05-06 962,314 19,359,434 28,322,787 18,709.66 465,953,997 18,999,861 345,584,569 69,951,596 482,236,956
2022-05-07 969,145 18,932,729 27,319,892 18,116.83 447,289,824 18,671,415 331,741,894 95,920,777 492,604,824
2022-05-08 975,941 17,839,603 26,412,065 17,508.28 432,104,861 17,846,015 320,479,647 89,520,323 472,115,160
2022-05-09 982,741 14,690,241 21,844,115 14,556.12 356,342,627 15,245,813 264,288,995 76,471,410 392,555,129
2022-05-10 989,571 13,635,935 31,470,849 10,573,849.39 366,422,581 13,477,134 271,765,004 80,548,328 421,471,100
2022-05-11 996,410 10,259,516 39,693,269 25,248,761.36 289,662,107 10,458,617 214,833,986 75,631,240 376,125,389
2022-05-12 1,003,195 9,581,486 43,924,635 29,452,097.77 280,460,084 9,670,162 208,009,113 75,134,974 375,772,467
2022-05-13 1,010,207 10,973,168 53,902,003 37,477,184.73 340,279,733 10,995,529 252,375,612 89,176,105 454,899,602
2022-05-14 1,017,179 11,331,616 59,848,280 42,070,697.82 371,267,462 11,615,082 275,358,312 98,681,018 498,905,006
2022-05-15 1,024,222 11,916,291 61,742,528 43,613,104.21 381,022,256 11,963,073 282,593,160 103,845,945 515,674,101
2022-05-16 1,031,247 11,070,042 56,676,320 40,172,009.19 347,303,185 11,216,298 257,584,702 95,712,866 472,432,238
2022-05-17 1,038,263 11,549,278 59,421,133 42,267,121.91 359,626,741 11,588,136 266,724,727 98,506,448 490,056,844
2022-05-18 1,044,985 11,505,734 52,688,111 37,631,336.97 313,434,540 11,567,356 232,465,310 85,493,128 431,350,976
2022-05-19 1,051,890 11,467,898 55,006,948 39,959,639.25 325,582,510 11,531,299 241,475,108 85,772,675 445,213,566
2022-05-20 1,058,796 11,246,893 54,112,456 39,615,645.46 316,347,972 11,313,775 234,626,118 84,278,962 435,193,850
2022-05-21 1,065,696 11,187,309 55,754,295 41,060,888.51 325,354,898 11,328,144 241,306,294 86,987,403 447,624,333
2022-05-22 1,072,674 11,445,206 57,322,456 42,003,535.27 331,370,355 11,587,782 245,767,784 89,726,681 457,853,445
2022-05-23 1,079,644 11,393,589 56,031,571 41,420,150.22 323,244,611 11,404,036 239,741,156 86,373,238 446,363,741
2022-05-24 1,086,605 11,650,983 59,641,714 44,612,795.50 331,500,418 11,741,444 245,864,249 92,542,067 466,053,252
2022-05-25 1,093,548 11,355,388 58,284,123 43,547,582.16 321,238,375 11,509,233 238,253,189 89,923,289 452,872,804
2022-05-26 1,100,467 10,677,864 54,650,843 41,107,060.91 300,376,122 10,733,398 222,780,261 83,262,272 423,211,698
2022-05-27 1,107,371 10,335,111 54,492,214 41,115,076.23 297,059,492 10,405,127 220,320,412 81,623,140 418,291,081
2022-05-28 1,114,253 10,864,004 57,829,255 43,749,969.61 314,331,981 11,062,521 233,130,916 85,553,245 442,189,911
2022-05-29 1,121,139 11,131,725 59,670,533 45,136,471.59 324,051,007 11,370,286 240,339,236 88,774,150 456,422,402
2022-05-30 1,128,033 11,732,215 63,097,953 47,756,791.78 342,263,208 11,934,351 253,846,698 97,769,331 486,137,339
2022-05-31 1,134,939 11,805,351 74,274,661 58,963,766.59 340,474,829 11,948,136 252,520,309 96,860,090 506,372,314
2022-06-01 1,141,677 11,244,679 67,690,554 53,678,288.38 308,339,286 11,313,703 228,686,308 87,774,716 460,388,248
2022-06-02 1,148,531 11,450,050 71,169,404 56,511,651.37 322,851,168 11,618,434 239,449,350 92,935,143 483,134,033
2022-06-03 1,155,361 11,086,517 67,146,049 53,381,288.38 304,756,025 11,136,768 226,028,707 86,257,482 455,036,812
2022-06-04 1,162,191 11,044,275 67,871,496 53,877,894.95 305,695,737 11,231,847 226,725,664 87,782,839 458,534,016
2022-06-05 1,168,945 11,222,834 68,035,148 54,202,573.86 305,464,873 11,272,468 226,554,440 87,558,038 458,845,501
2022-06-06 1,175,760 11,275,119 68,894,536 54,781,007.72 307,841,791 11,394,874 228,317,331 88,813,285 463,476,153
2022-06-07 1,182,503 11,038,517 67,628,096 53,779,095.36 299,810,344 11,120,725 222,360,639 87,255,444 453,182,515
2022-06-08 1,189,273 10,853,966 66,630,434 53,132,601.89 293,245,368 10,869,771 217,491,587 85,246,943 444,225,303
2022-06-09 1,196,022 10,910,543 68,656,497 54,610,401.78 299,664,022 10,935,414 222,252,117 86,688,056 454,053,028
2022-06-10 1,202,808 10,455,392 64,562,776 51,566,393.28 281,442,067 10,516,651 208,737,421 81,255,048 427,093,681
2022-06-11 1,209,560 9,902,483 60,176,361 48,054,853.09 261,847,937 9,959,983 194,205,023 75,615,459 397,914,162
2022-06-12 1,216,309 9,303,464 56,264,446 44,898,748.56 244,692,506 9,353,530 181,481,337 69,012,028 370,313,554
2022-06-13 1,222,967 8,759,431 51,599,685 41,109,628.30 224,441,554 8,756,378 166,461,793 64,169,610 340,856,525
2022-06-14 1,229,621 8,848,993 54,864,329 43,817,449.90 238,524,225 8,956,648 176,906,501 67,628,085 361,022,007
2022-06-15 1,236,320 9,764,121 63,184,240 50,421,654.82 274,265,790 9,768,169 203,414,984 75,271,580 411,824,749
2022-06-16 1,242,989 8,920,166 53,176,197 42,246,468.86 229,458,769 8,918,006 170,182,916 64,113,318 347,557,073
2022-06-17 1,249,647 9,157,904 55,272,154 43,888,309.03 238,029,982 9,118,175 176,539,936 65,960,543 359,937,021
2022-06-18 1,256,310 8,640,015 53,475,500 42,513,907.14 229,595,336 8,686,825 170,284,204 63,353,334 346,953,785
2022-06-19 1,263,003 8,885,295 57,035,607 45,131,272.59 243,544,692 8,969,960 180,630,037 66,981,819 367,633,991
2022-06-20 1,269,614 8,720,955 59,515,435 47,121,220.35 253,933,548 8,717,673 188,335,150 70,367,150 382,777,584
2022-06-21 1,276,376 8,808,088 59,155,268 46,820,285.73 251,904,550 8,769,325 186,830,301 70,704,699 381,087,966
2022-06-22 1,283,096 8,572,605 57,026,894 45,133,825.07 242,487,923 8,550,627 179,846,261 67,528,621 366,658,833
2022-06-23 1,289,783 8,728,083 59,378,994 47,089,747.52 252,525,606 8,794,238 187,290,920 70,574,437 381,856,419
2022-06-24 1,296,569 9,012,942 63,041,858 50,080,246.65 268,777,093 9,077,803 199,344,176 74,295,241 404,852,267
2022-06-25 1,303,311 8,936,434 62,037,923 49,338,164.37 264,016,753 8,991,273 195,813,571 72,511,923 397,629,287
2022-06-26 1,310,012 8,882,814 60,378,693 48,013,815.78 256,616,116 8,844,341 190,324,733 70,964,000 387,408,397
2022-06-27 1,316,693 8,813,879 60,027,917 47,754,506.10 254,522,087 8,810,507 188,771,652 70,618,722 384,797,183
2022-06-28 1,323,587 8,435,258 56,186,106 44,713,964.92 237,789,363 8,392,657 176,361,476 65,414,900 359,504,363
2022-06-29 1,330,303 8,127,218 53,917,768 42,974,361.39 227,257,437 8,099,531 168,550,252 63,353,067 345,022,197
2022-06-30 1,337,106 7,989,368 52,800,544 42,079,119.05 221,609,412 7,950,424 164,361,275 61,898,208 337,078,939
2022-07-01 1,343,825 8,036,381 53,228,517 42,403,043.51 221,225,723 8,032,818 164,076,704 62,097,786 337,875,250
2022-07-02 1,350,568 8,115,817 53,463,901 42,754,487.96 222,106,906 8,068,570 164,730,252 61,926,274 339,059,302
2022-07-03 1,357,347 8,059,573 53,583,479 42,824,417.63 222,389,795 8,074,854 164,940,063 61,842,416 339,324,803
2022-07-04 1,364,102 8,306,054 56,172,917 44,881,642.03 232,323,427 8,345,375 172,307,550 65,824,779 355,838,316
2022-07-05 1,370,943 8,167,691 54,038,908 43,142,748.50 222,858,025 8,161,214 165,287,336 62,888,490 341,686,388
2022-07-06 1,377,797 8,220,201 54,870,746 43,878,573.78 226,272,203 8,260,561 167,819,532 63,979,015 347,028,629
2022-07-07 1,384,635 8,454,341 57,428,351 45,897,717.66 235,818,895 8,475,577 174,900,037 66,348,466 361,504,489
2022-07-08 1,391,485 8,347,993 56,781,290 45,626,976.84 231,942,990 8,356,500 172,025,391 65,273,519 356,411,670
2022-07-09 1,398,299 8,512,384 58,003,533 46,560,401.89 236,400,931 8,530,390 175,331,716 67,093,742 364,032,167
2022-07-10 1,405,185 8,200,747 54,792,445 43,954,304.63 222,591,394 8,212,165 165,089,583 63,163,652 343,412,897
2022-07-11 1,411,909 8,013,857 53,137,544 42,124,715.87 213,044,702 8,034,997 158,009,079 60,852,851 330,173,043
2022-07-12 1,418,742 7,802,210 51,555,478 41,454,972.33 206,853,660 7,839,149 153,417,362 59,590,511 321,659,682
2022-07-13 1,425,585 7,872,101 52,163,299 42,000,831.77 208,759,096 7,899,050 154,830,569 60,446,130 325,211,981
2022-07-14 1,432,337 8,094,221 54,520,819 43,906,210.02 218,364,317 8,130,768 161,954,482 62,774,588 339,381,088
2022-07-15 1,439,201 8,196,503 57,266,356 46,449,914.80 221,811,011 8,224,894 164,510,795 65,272,857 349,921,319
2022-07-16 1,446,008 8,420,469 60,075,867 48,829,967.84 233,139,578 8,457,753 172,912,865 68,047,456 366,744,379
2022-07-17 1,452,960 8,406,950 58,376,023 47,433,611.83 226,330,732 8,384,188 167,862,942 67,037,990 357,501,704
2022-07-18 1,459,795 8,810,099 63,459,950 51,600,056.91 245,788,295 8,843,794 182,294,052 72,522,631 387,530,583
2022-07-19 1,466,580 9,119,964 66,419,530 53,985,656.48 256,453,536 9,133,102 190,204,152 75,840,498 404,702,903
2022-07-20 1,473,380 8,872,337 63,382,992 51,566,650.17 243,365,854 8,869,219 180,497,398 72,186,336 385,374,932
2022-07-21 1,480,245 8,939,503 63,756,044 51,889,683.80 244,555,939 8,951,150 181,380,049 74,340,850 389,257,280
2022-07-22 1,487,055 8,935,435 63,732,674 50,563,063.36 237,737,338 8,947,395 176,322,890 76,906,922 385,408,379
2022-07-23 1,493,873 9,027,507 64,072,350 52,244,229.36 239,054,235 9,094,965 177,299,595 76,331,693 388,070,339
2022-07-24 1,500,756 9,062,996 64,983,472 53,076,886.68 242,500,929 9,099,418 179,855,908 76,969,345 393,048,026
2022-07-25 1,507,666 8,503,069 59,996,247 48,998,430.69 223,238,462 8,587,338 165,569,495 70,943,456 362,598,037
2022-07-26 1,508,002 8,369,385 58,665,113 47,907,911.40 218,270,021 8,451,510 161,884,546 68,970,019 354,248,484
2022-07-27 1,521,363 9,036,226 65,073,627 53,124,975.99 241,301,089 8,966,887 178,966,022 75,248,046 390,415,783
2022-07-28 1,528,147 9,204,053 68,754,917 56,300,442.41 255,630,882 9,234,771 189,594,013 79,286,407 412,374,604
2022-07-29 1,535,018 9,491,651 72,900,518 59,839,776.20 271,641,750 9,570,551 201,468,810 82,785,781 436,057,088
2022-07-30 1,541,851 9,412,656 71,625,918 58,833,747.60 267,203,319 9,408,333 198,176,954 81,359,895 428,817,504
2022-07-31 1,548,704 9,730,583 76,172,544 62,362,236.54 283,162,162 9,785,010 210,013,166 85,277,898 453,341,438
2022-08-01 1,555,507 9,521,757 71,837,218 58,833,639.30 266,660,302 9,567,250 197,774,214 83,248,949 430,783,028
2022-08-02 1,562,419 9,425,385 70,276,927 57,568,511.38 260,144,100 9,464,770 192,941,336 79,997,389 419,674,319
2022-08-03 1,569,336 9,442,971 70,495,413 57,808,981.01 260,719,633 9,408,325 193,368,192 80,413,863 420,937,745
2022-08-04 1,576,157 9,424,780 71,207,502 58,347,255.31 262,377,948 9,471,213 194,598,116 83,344,752 426,393,619
2022-08-05 1,583,026 10,018,705 77,463,747 63,543,001.74 284,983,057 9,960,660 211,363,671 90,069,354 462,419,138
2022-08-06 1,589,971 10,146,996 75,839,241 62,212,023.74 277,267,015 9,956,382 205,640,906 91,475,446 455,270,995
2022-08-07 1,596,911 10,241,630 77,066,915 63,245,468.96 281,250,223 10,067,592 208,595,135 92,735,025 461,951,767
2022-08-08 1,603,908 10,630,413 82,645,382 67,787,809.22 301,309,331 10,694,969 223,472,394 97,104,448 492,335,415
2022-08-09 1,610,881 10,337,421 79,790,186 65,414,130.48 289,840,945 10,401,740 214,966,625 93,726,711 474,636,814
2022-08-10 1,617,841 10,596,468 85,665,772 70,311,764.86 307,955,597 10,707,531 228,401,737 100,077,092 505,760,364
2022-08-11 1,624,758 10,251,034 82,990,047 68,148,710.93 298,148,778 10,351,767 221,128,304 97,282,390 490,152,253
2022-08-12 1,631,646 10,323,308 85,816,863 70,459,839.46 308,004,371 10,495,267 228,437,912 100,215,124 505,748,313
2022-08-13 1,638,589 10,870,676 84,193,449 69,064,403.80 301,865,354 10,693,320 223,884,781 98,950,330 497,656,959
2022-08-14 1,645,126 3,768,045,441 84,237,229 69,393,588.85 304,476,387 3,423,299,609 225,821,308 96,262,421 7,667,059,597
2022-08-15 1,652,177 377,247,598 84,667,461 69,396,088.00 304,476,387 3,423,298,488 225,821,308 NA NA
2022-08-16 1,658,789 377,241,788 85,023,163 69,418,507.01 304,476,387 3,423,298,326 225,821,308 NA NA
2022-08-17 1,664,775 3,767,923,020 85,075,903 69,443,938.13 304,476,387 3,423,298,067 225,821,308 NA NA
2022-08-18 1,673,113 3,760,367,306 85,122,325 69,469,499.63 304,476,387 3,423,289,156 225,821,308 NA NA
2022-08-19 1,673,479 3,401,345,955 85,122,803 69,469,499.63 304,476,387 3,423,284,600 225,821,308 NA NA
2022-08-21 1,687,200 27,573,396 85,361,485 69,506,881.70 304,476,387 67,705,853 225,821,308 NA NA

Karura

Row

Components of Total Value Locked: Karura

Row

Overall Total Value Locked (TVL) for Karura

  • The Overall TVL in the table below does not includes the Crowdloan TVL, which also seems to be the case on the https://stats.karura.network page.
Date Block dexTVL bridgeTVL liquidStakingTVL crowdloanTVL LPTokenStakingTVL stableCoinTVL OverallTVL
2021-12-30 1,216,792 28,477,809 51,134,081 0 140,764,558 25,507,570 NA NA
2021-12-31 1,223,729 27,960,331 48,351,235 0 139,511,714 25,103,934 28,130,859 129,546,358
2022-01-01 1,230,690 28,936,720 49,930,895 0 143,766,372 26,160,725 28,862,133 133,890,473
2022-01-02 1,237,666 28,994,199 51,315,701 0 147,915,792 26,526,360 29,765,768 136,602,028
2022-01-03 1,244,636 28,394,734 50,409,234 0 145,229,694 26,154,090 28,808,841 133,766,899
2022-01-04 1,251,539 28,279,294 52,019,213 0 150,381,390 26,588,509 19,511,557 126,398,574
2022-01-05 1,258,602 27,314,933 44,394,638 17,723,365 132,711,276 24,319,899 25,764,959 139,517,793
2022-01-06 1,265,574 26,758,257 45,074,353 17,710,566 135,913,545 24,795,243 26,374,687 140,713,108
2022-01-07 1,272,463 26,061,882 42,014,831 16,477,194 127,063,454 23,539,056 24,655,919 132,748,882
2022-01-08 1,279,512 24,834,724 40,087,529 15,777,941 120,914,495 22,439,016 23,320,806 126,460,016
2022-01-09 1,286,513 24,276,416 41,015,465 16,224,592 123,710,843 22,266,997 23,863,867 127,647,337
2022-01-10 1,293,438 23,718,700 39,980,105 15,865,354 120,252,993 21,399,214 23,289,506 124,252,880
2022-01-11 1,300,364 24,179,221 40,908,582 14,949,413 130,130,417 22,158,239 23,500,400 125,695,855
2022-01-12 1,307,287 25,224,845 43,333,388 16,031,649 138,263,881 23,105,439 24,877,177 132,572,497
2022-01-13 1,314,250 24,947,366 42,311,230 15,588,045 134,655,690 22,638,589 24,798,264 130,283,494
2022-01-14 1,321,145 25,197,576 44,074,088 16,310,065 140,874,808 23,229,692 25,251,168 134,062,589
2022-01-15 1,327,988 25,173,731 44,632,576 16,610,581 143,741,316 23,265,937 25,720,836 135,403,662
2022-01-16 1,334,836 24,928,016 42,887,794 15,933,003 138,649,757 22,758,043 24,757,053 131,263,909
2022-01-17 1,341,616 24,961,950 39,933,108 14,793,150 128,932,698 22,373,260 22,990,965 125,052,433
2022-01-18 1,348,556 24,818,429 41,763,928 14,731,644 127,815,161 22,260,949 22,932,495 126,507,444
2022-01-19 1,355,482 24,389,176 40,675,199 14,189,131 123,004,239 21,736,572 22,172,875 123,162,954
2022-01-20 1,362,368 24,053,310 38,238,798 14,140,066 122,392,851 21,465,155 22,542,280 120,439,610
2022-01-21 1,369,220 20,551,211 32,739,285 12,780,374 107,393,801 18,864,510 20,114,175 105,049,555
2022-01-22 1,376,066 16,317,883 28,167,143 11,865,142 94,439,392 16,607,242 17,473,724 90,431,134
2022-01-23 1,382,988 16,849,199 28,607,262 11,980,949 94,935,519 16,828,061 17,867,771 92,133,241
2022-01-24 1,389,889 14,899,662 27,129,450 11,315,066 87,298,181 15,616,499 16,469,949 85,430,625
2022-01-25 1,396,806 17,827,278 26,446,093 11,103,209 86,461,281 17,622,323 15,477,409 88,476,311
2022-01-26 1,403,696 16,977,302 24,928,536 10,568,643 82,532,362 16,721,750 14,509,393 83,705,624
2022-01-27 1,410,563 16,130,280 24,184,604 10,573,141 81,043,983 15,549,894 14,142,683 80,580,602
2022-01-28 1,417,498 16,380,471 25,439,407 11,004,982 84,592,037 16,104,994 14,880,991 83,810,844
2022-01-29 1,424,433 16,530,233 25,580,442 11,160,147 85,784,745 16,445,727 15,030,737 84,747,286
2022-01-30 1,431,336 16,734,485 24,540,561 10,700,703 82,116,417 16,243,530 14,737,654 82,956,932
2022-01-31 1,438,201 16,430,659 24,495,023 10,668,834 82,341,929 16,197,197 14,557,891 82,349,604
2022-02-01 1,445,158 16,888,402 25,635,766 11,034,229 86,486,338 16,914,252 15,404,398 85,877,048
2022-02-02 1,452,085 16,385,550 23,913,238 10,349,332 81,214,369 16,052,553 14,365,291 81,065,964
2022-02-03 1,459,034 16,206,473 23,722,177 10,278,882 80,562,891 15,956,459 14,217,673 80,381,663
2022-02-04 1,465,910 17,573,369 26,122,753 11,391,759 89,282,686 17,121,034 15,827,834 88,036,748
2022-02-05 1,472,341 18,115,769 27,078,583 11,849,538 92,805,684 17,713,412 16,398,245 91,155,546
2022-02-06 1,478,495 18,433,454 28,217,628 12,416,470 97,155,559 18,154,593 16,889,128 94,111,273
2022-02-07 1,484,572 18,710,293 28,793,182 12,616,948 99,906,804 18,267,154 17,157,854 95,545,431
2022-02-08 1,489,375 18,120,633 27,602,820 12,049,255 95,491,781 17,472,360 16,186,674 91,431,741
2022-02-09 1,493,799 18,398,595 28,125,621 12,480,553 97,165,581 17,803,463 16,525,057 93,333,290
2022-02-10 1,498,135 18,252,209 28,034,357 13,414,151 90,680,860 17,663,953 16,628,704 93,993,374
2022-02-11 1,502,412 17,183,038 25,318,045 12,137,702 81,730,541 16,404,820 15,073,577 86,117,181
2022-02-12 1,506,675 16,523,389 25,340,756 12,182,443 83,118,693 15,821,602 15,213,651 85,081,841
2022-02-13 1,510,965 16,142,836 25,398,301 12,321,765 82,176,554 15,494,594 15,517,512 84,875,008
2022-02-14 1,515,339 15,758,810 25,800,264 12,471,674 83,664,933 15,259,547 15,557,219 84,847,514
2022-02-15 1,519,779 16,270,303 26,785,512 13,000,873 87,273,124 15,663,195 16,107,445 87,827,329
2022-02-16 1,524,208 16,060,289 25,561,909 12,573,172 84,316,412 15,417,258 15,537,487 85,150,115
2022-02-17 1,528,534 15,144,082 23,726,986 11,718,180 78,222,578 14,445,991 14,190,604 79,225,843
2022-02-18 1,532,831 14,556,699 22,197,937 11,201,867 74,428,966 13,954,505 13,518,494 75,429,502
2022-02-19 1,537,082 14,233,537 22,341,383 11,320,339 74,905,046 13,747,935 13,445,019 75,088,213
2022-02-20 1,541,290 13,366,110 21,185,914 10,655,435 70,229,432 12,813,940 12,490,299 70,511,699
2022-02-21 1,545,293 12,628,156 19,536,563 9,792,882 64,326,030 12,086,393 12,830,700 66,874,694
2022-02-22 1,549,212 11,534,618 19,525,296 9,860,940 64,862,248 11,070,438 12,685,919 64,677,212
2022-02-23 1,553,133 11,597,913 18,744,439 9,445,214 62,075,922 11,039,039 12,841,973 63,668,578
2022-02-24 1,557,141 10,531,902 17,536,389 8,915,579 58,402,583 10,108,575 12,117,829 59,210,274
2022-02-25 1,561,208 10,855,034 18,837,499 9,614,395 62,887,765 10,661,756 13,064,856 63,033,540
2022-02-26 1,565,186 10,921,496 19,109,865 9,770,904 64,185,712 10,696,326 13,078,500 63,577,091
2022-02-27 1,569,198 10,116,662 17,441,119 8,984,982 58,898,709 9,913,956 12,057,255 58,513,974
2022-02-28 1,573,192 10,479,921 18,930,295 9,695,624 64,506,440 10,482,123 13,051,277 62,639,240
2022-03-01 1,577,360 10,879,012 20,196,726 10,451,229 69,793,442 10,889,494 14,094,592 66,511,053
2022-03-02 1,581,658 10,743,363 20,126,523 10,443,673 69,763,374 10,776,685 13,957,452 66,047,695
2022-03-03 1,586,008 10,431,306 18,990,177 9,884,753 65,944,705 10,385,361 13,403,247 63,094,845
2022-03-04 1,590,339 9,792,560 17,465,894 9,086,777 60,311,918 9,643,278 12,258,298 58,246,807
2022-03-05 1,594,558 9,823,524 17,884,062 9,309,293 61,619,887 9,727,515 12,338,275 59,082,669
2022-03-06 1,598,920 9,881,613 17,885,512 9,327,350 61,685,035 9,787,879 12,547,580 59,429,935
2022-03-07 1,603,233 9,684,250 17,326,846 9,069,358 59,986,178 9,488,150 11,954,912 57,523,515
2022-03-08 1,607,573 9,699,877 17,932,807 9,387,102 60,737,885 9,573,868 12,157,986 58,751,640
2022-03-09 1,611,910 10,236,962 19,725,994 10,343,541 67,117,367 10,225,894 13,544,592 64,076,982
2022-03-10 1,616,357 9,900,504 18,299,797 9,634,859 62,842,663 9,773,595 12,491,199 60,099,955
2022-03-11 1,620,876 9,938,713 18,462,794 9,726,906 62,496,878 9,744,618 12,326,243 60,199,273
2022-03-12 1,625,432 9,937,874 18,441,732 9,895,685 62,301,434 9,759,643 8,778,466 56,813,400
2022-03-13 1,629,884 9,582,229 18,116,132 9,700,675 61,218,977 9,568,388 11,976,980 58,944,404
2022-03-14 1,634,405 9,517,275 17,795,026 9,596,841 59,835,837 9,434,480 11,662,586 58,006,208
2022-03-15 1,638,930 9,610,346 18,506,925 9,986,903 62,476,832 9,569,630 12,033,881 59,707,686
2022-03-16 1,643,457 9,916,992 19,246,131 10,344,356 64,857,236 9,892,838 12,611,340 62,011,656
2022-03-17 1,647,983 10,164,252 19,882,115 10,758,928 67,488,209 10,151,956 13,177,318 64,134,570
2022-03-18 1,652,652 10,723,778 21,763,378 11,811,109 74,028,055 10,815,317 14,620,780 69,734,362
2022-03-19 1,657,396 10,857,718 21,697,651 11,760,488 73,587,054 10,793,818 14,630,661 69,740,336
2022-03-20 1,662,219 10,805,099 22,069,929 12,004,244 75,235,797 10,790,571 14,435,960 70,105,804
2022-03-21 1,666,997 10,821,370 22,461,272 12,289,184 77,490,917 10,765,845 14,920,932 71,258,603
2022-03-22 1,671,509 10,996,672 22,945,241 12,586,513 79,074,512 10,972,353 15,076,643 72,577,421
2022-03-23 1,675,850 11,233,620 23,583,433 13,062,818 82,221,656 11,139,196 15,709,358 74,728,425
2022-03-24 1,680,082 11,210,552 23,562,119 13,021,250 81,961,065 11,102,612 15,926,435 74,822,967
2022-03-25 1,684,322 11,178,468 23,689,405 13,123,045 82,517,327 11,064,343 15,906,943 74,962,205
2022-03-26 1,688,574 11,229,645 23,533,482 13,049,274 82,607,532 11,065,482 15,887,907 74,765,789
2022-03-27 1,692,713 12,008,614 24,954,498 13,815,147 87,157,862 11,906,857 17,345,787 80,030,904
2022-03-28 1,696,873 11,865,913 24,656,797 13,634,351 86,130,530 11,777,602 17,079,663 79,014,326
2022-03-29 1,700,908 12,430,365 26,011,354 14,389,203 91,031,656 12,273,067 17,897,927 83,001,915
2022-03-30 1,704,922 12,650,038 27,215,507 15,121,153 94,504,540 12,455,690 18,441,788 85,884,175
2022-03-31 1,708,906 12,971,828 27,453,575 15,209,696 94,975,610 12,736,756 19,092,108 87,463,963
2022-04-01 1,712,970 12,900,127 27,266,240 15,225,084 95,055,792 12,674,707 18,957,801 87,023,959
2022-04-02 1,717,078 13,877,724 29,392,612 16,411,345 102,197,003 13,890,553 20,648,204 94,220,438
2022-04-03 1,721,276 13,765,513 28,762,687 16,147,422 100,488,124 13,538,763 20,101,758 92,316,143
2022-04-04 1,725,277 13,113,962 26,814,870 14,834,897 94,544,631 13,011,853 18,544,418 86,320,000
2022-04-05 1,729,249 12,982,728 25,909,704 14,361,013 91,056,713 12,918,024 18,129,594 84,301,063
2022-04-06 1,733,105 12,388,690 24,751,557 13,757,432 86,887,248 12,343,894 17,126,109 80,367,681
2022-04-07 1,736,920 12,192,261 25,924,313 14,445,681 90,901,360 11,991,153 19,099,672 83,653,079
2022-04-08 1,740,728 11,748,502 24,358,316 13,690,735 86,235,769 11,243,280 17,863,594 78,904,427
2022-04-09 1,744,511 11,679,970 25,159,437 14,129,747 89,012,072 11,394,509 17,970,468 80,334,132
2022-04-10 1,748,342 11,992,406 24,402,148 13,629,715 86,250,803 11,536,706 18,709,034 80,270,010
2022-04-11 1,752,148 10,613,556 21,942,010 12,131,417 76,819,392 10,171,332 15,794,129 70,652,445
2022-04-12 1,756,009 10,807,351 21,779,978 12,208,892 76,919,620 10,284,334 15,777,556 70,858,110
2022-04-13 1,759,810 11,088,597 22,767,525 12,792,713 80,051,730 10,505,451 16,804,316 73,958,602
2022-04-14 1,763,619 11,029,818 22,969,648 12,946,382 80,337,379 10,478,740 16,752,968 74,177,556
2022-04-15 1,767,375 11,234,948 23,770,221 13,410,938 82,893,181 10,788,714 17,192,776 76,397,598
2022-04-16 1,771,087 11,528,819 25,046,710 14,131,118 87,253,078 11,210,479 18,011,711 79,928,836
2022-04-17 1,774,902 11,432,100 25,067,937 13,960,079 86,220,735 11,083,865 18,250,198 79,794,178
2022-04-18 1,778,708 11,255,844 24,272,117 13,882,331 83,644,887 10,805,322 16,554,502 76,770,115
2022-04-19 1,782,472 11,267,515 25,774,203 14,713,377 88,576,082 11,130,608 17,592,326 80,478,028
2022-04-20 1,786,343 11,377,126 26,241,715 15,042,279 90,385,189 11,009,850 18,213,130 81,884,101
2022-04-21 1,790,294 11,532,164 24,862,952 14,142,810 83,995,684 11,047,198 18,110,831 79,695,954
2022-04-22 1,794,197 11,731,877 24,569,432 14,117,181 82,407,077 11,439,832 18,008,727 79,867,048
2022-04-23 1,798,162 12,038,829 25,192,159 15,293,481 82,231,679 11,376,034 19,281,727 83,182,229
2022-04-24 1,802,115 11,786,301 24,391,592 14,807,685 80,217,106 11,147,580 19,199,526 81,332,684
2022-04-25 1,806,087 11,986,409 24,965,430 15,201,526 81,966,076 11,064,717 19,705,764 82,923,846
2022-04-26 1,810,046 11,595,769 23,489,920 14,400,527 77,330,553 10,617,280 18,674,336 78,777,832
2022-04-27 1,814,021 11,456,731 23,866,785 14,702,543 78,793,875 10,662,643 18,695,554 79,384,256
2022-04-28 1,817,974 11,458,940 23,752,925 14,663,300 78,598,431 10,806,233 18,558,400 79,239,799
2022-04-29 1,821,980 10,877,984 21,887,982 13,414,234 73,110,973 10,096,881 17,325,218 73,602,298
2022-04-30 1,826,039 10,135,613 19,670,509 12,055,765 65,568,852 9,352,427 15,469,289 66,683,603
2022-05-01 1,830,125 10,191,535 20,056,144 12,283,977 66,691,400 9,500,086 15,730,769 67,762,511
2022-05-02 1,834,044 10,045,055 19,877,550 12,229,399 65,513,727 9,441,725 15,789,105 67,382,835
2022-05-03 1,837,991 9,940,595 19,438,387 11,951,408 63,910,086 9,303,836 15,530,323 66,164,548
2022-05-04 1,841,986 10,332,852 21,486,168 13,203,540 70,359,728 9,675,387 16,898,031 71,595,977
2022-05-05 1,846,132 9,849,962 19,537,458 12,007,333 63,824,893 9,040,416 15,858,555 66,293,723
2022-05-06 1,850,190 9,840,823 19,689,475 12,050,273 63,484,119 9,080,372 15,831,354 66,492,296
2022-05-07 1,854,421 9,415,404 18,000,461 11,169,970 58,848,596 8,701,207 14,431,136 61,718,178
2022-05-08 1,858,658 8,632,921 17,256,328 10,679,637 56,127,418 8,116,124 13,330,527 58,015,538
2022-05-09 1,862,992 7,868,856 15,149,555 9,370,326 49,256,821 7,304,147 11,702,787 51,395,671
2022-05-10 1,867,957 7,063,847 14,505,732 8,978,157 46,465,484 6,597,078 11,443,966 48,588,780
2022-05-11 1,873,972 5,668,544 11,333,232 7,294,151 37,138,310 5,461,383 10,608,911 40,366,222
2022-05-12 1,880,188 5,278,034 11,319,930 7,527,435 34,763,920 5,050,542 9,753,341 38,929,282
2022-05-13 1,886,554 5,513,923 11,908,799 7,974,383 37,378,856 5,342,800 10,508,482 41,248,386
2022-05-14 1,892,961 4,615,804 11,878,741 7,979,481 36,963,914 4,479,822 10,145,673 39,099,521
2022-05-15 1,899,371 5,098,244 13,782,259 9,704,209 38,612,156 4,897,258 12,011,210 45,493,179
2022-05-16 1,905,778 5,015,528 15,351,098 11,189,975 36,873,709 4,803,108 13,368,708 49,728,417
2022-05-17 1,912,230 5,443,403 17,448,119 12,839,946 41,591,419 5,171,446 14,786,902 55,689,816
2022-05-18 1,918,591 4,831,627 15,835,129 11,633,620 37,997,260 4,804,447 13,547,934 50,652,757
2022-05-19 1,924,950 5,051,995 16,225,841 11,866,785 39,895,569 4,969,413 13,862,470 51,976,504
2022-05-20 1,931,289 4,898,759 15,647,150 11,314,258 37,884,504 4,876,639 13,279,427 50,016,233
2022-05-21 1,937,640 5,106,622 16,761,086 12,029,939 40,106,047 5,004,865 14,171,588 53,074,101
2022-05-22 1,944,002 5,212,005 16,929,442 12,141,015 40,352,106 5,121,311 14,419,157 53,822,931
2022-05-23 1,950,438 5,142,609 17,446,267 12,545,228 41,399,483 4,976,457 14,829,710 54,940,271
2022-05-24 1,956,833 5,057,268 17,472,166 12,518,757 41,168,960 4,993,204 14,829,440 54,870,835
2022-05-25 1,963,028 5,050,561 17,263,663 12,427,987 40,146,639 4,911,964 14,681,528 54,335,703
2022-05-26 1,969,604 4,618,061 15,258,739 11,036,697 35,264,055 4,520,738 13,114,722 48,548,957
2022-05-27 1,975,998 4,450,433 14,551,135 10,552,867 33,481,007 4,318,708 12,570,318 46,443,460
2022-05-28 1,982,535 4,453,273 14,817,753 10,776,720 33,908,979 4,337,506 12,802,796 47,188,049
2022-05-29 1,988,972 4,492,985 15,688,798 11,415,697 35,866,422 4,393,571 13,441,785 49,432,835
2022-05-30 1,995,443 4,740,857 17,082,611 12,429,566 38,914,342 4,696,021 14,734,171 53,683,226
2022-05-31 2,001,782 4,882,592 17,557,356 12,660,720 39,629,966 4,752,189 15,254,737 55,107,595
2022-06-01 2,008,273 4,595,685 16,745,530 12,175,530 36,748,425 4,491,236 14,597,291 52,605,272
2022-06-02 2,014,698 4,575,532 16,911,602 12,280,079 37,009,016 4,527,606 14,688,565 52,983,386
2022-06-03 2,021,059 4,465,668 15,655,627 11,427,459 34,174,081 4,322,136 13,728,036 49,598,925
2022-06-04 2,027,513 4,449,137 15,848,848 11,565,414 34,565,469 4,350,549 13,811,670 50,025,617
2022-06-05 2,034,053 4,407,153 15,791,545 11,536,661 34,268,796 4,340,263 13,862,453 49,938,075
2022-06-06 2,040,490 4,474,010 16,291,584 11,910,789 35,089,659 4,391,089 14,227,562 51,295,033
2022-06-07 2,046,816 4,388,449 15,968,573 11,761,642 33,590,756 4,290,396 14,005,969 50,415,028
2022-06-08 2,053,305 4,306,263 15,872,801 11,707,615 33,359,732 4,227,290 13,905,651 50,019,619
2022-06-09 2,059,744 4,359,234 15,835,910 11,686,991 33,250,484 4,258,130 14,076,099 50,216,364
2022-06-10 2,066,092 4,117,787 14,183,232 10,449,312 29,651,814 4,030,011 12,632,440 45,412,782
2022-06-11 2,072,325 3,963,451 13,837,954 10,149,406 28,573,867 3,894,232 12,316,369 44,161,412
2022-06-12 2,078,699 3,771,603 12,587,494 9,236,596 26,037,108 3,673,255 11,367,864 40,636,813
2022-06-13 2,084,974 3,372,037 11,898,249 7,831,543 23,066,865 3,337,302 9,703,009 36,142,139
2022-06-14 2,091,245 3,589,270 13,209,821 9,476,166 25,683,305 3,559,449 10,736,969 40,571,674
2022-06-15 2,097,549 3,764,179 14,806,940 10,777,366 28,624,983 3,704,450 12,009,355 45,062,290
2022-06-16 2,103,874 3,440,450 12,358,705 8,915,974 24,452,010 3,377,222 10,170,473 38,262,825
2022-06-17 2,110,292 3,409,689 12,441,009 8,991,893 24,550,734 3,378,457 10,237,658 38,458,706
2022-06-18 2,116,724 3,445,679 12,332,708 8,906,555 24,393,878 3,385,252 10,142,229 38,212,423
2022-06-19 2,123,104 3,549,822 12,779,959 9,213,173 25,211,735 3,476,219 10,658,611 39,677,783
2022-06-20 2,129,497 3,622,729 13,698,153 9,626,126 26,363,349 3,554,046 11,062,858 41,563,913
2022-06-21 2,135,922 3,727,008 13,675,207 9,799,394 26,940,660 3,653,256 11,270,679 42,125,544
2022-06-22 2,142,278 3,634,993 13,363,716 9,604,004 26,269,636 3,555,480 10,997,083 41,155,276
2022-06-23 2,148,575 3,646,287 14,090,545 9,918,909 27,162,162 3,593,146 11,193,642 42,442,529
2022-06-24 2,155,139 3,752,477 14,986,389 10,567,805 28,917,147 3,721,508 11,840,803 44,868,982
2022-06-25 2,161,562 3,759,708 14,905,610 10,473,270 28,632,500 3,750,830 11,689,145 44,578,563
2022-06-26 2,168,013 3,851,061 13,132,847 9,304,393 26,522,711 3,769,934 11,280,487 41,338,722
2022-06-27 2,173,904 3,734,609 13,187,844 9,347,125 26,615,421 3,767,156 11,178,714 41,215,449
2022-06-28 2,179,759 3,731,027 12,453,144 8,854,054 25,099,480 3,709,805 10,784,005 39,532,035
2022-06-29 2,185,605 3,789,631 12,188,900 8,669,292 24,499,117 3,730,844 10,833,491 39,212,158
2022-06-30 2,191,479 3,746,764 11,696,662 8,323,844 23,455,748 3,685,669 10,483,928 37,936,869
2022-07-01 2,197,147 3,828,386 12,220,046 8,703,273 24,452,010 3,800,847 10,978,730 39,531,281
2022-07-02 2,202,851 3,968,093 12,416,298 8,848,635 24,540,711 3,880,399 11,623,048 40,736,473
2022-07-03 2,208,544 3,935,274 12,907,697 8,917,291 24,771,235 3,899,220 11,538,859 41,198,341
2022-07-04 2,214,453 4,130,925 13,116,923 9,365,309 25,844,672 4,090,158 11,752,992 42,456,307
2022-07-05 2,220,335 4,030,874 12,855,999 9,217,965 25,339,525 4,025,373 12,051,037 42,181,249
2022-07-06 2,226,215 4,074,906 13,119,887 9,423,340 25,875,241 4,111,061 12,170,529 42,899,724
2022-07-07 2,232,059 4,117,098 13,436,785 9,679,100 26,287,677 4,127,058 12,441,430 43,801,471
2022-07-08 2,237,967 4,105,435 13,495,414 9,760,780 26,212,507 4,093,787 12,535,997 43,991,412
2022-07-09 2,243,857 4,168,202 13,722,891 9,953,940 26,654,009 4,152,080 12,628,716 44,625,828
2022-07-10 2,249,769 4,027,428 12,926,302 9,345,997 25,041,849 4,016,985 12,000,338 42,317,051
2022-07-11 2,255,713 3,829,917 12,968,549 9,621,736 23,427,685 3,842,121 12,134,619 42,396,941
2022-07-12 2,261,599 3,854,153 13,213,469 9,825,109 23,754,426 3,869,523 12,320,085 43,082,339
2022-07-13 2,267,294 3,932,030 13,630,567 10,154,424 24,560,757 3,975,230 12,549,204 44,241,456
2022-07-14 2,273,077 4,067,891 14,236,856 10,612,251 25,594,604 4,098,431 13,224,942 46,240,371
2022-07-15 2,278,953 4,272,940 15,246,217 11,386,438 27,398,198 4,267,423 14,060,384 49,233,403
2022-07-16 2,284,856 4,358,955 15,701,143 11,756,417 28,297,740 4,310,313 14,361,080 50,487,908
2022-07-17 2,290,692 4,299,482 15,253,664 11,405,301 27,540,521 4,215,869 13,957,768 49,132,085
2022-07-18 2,296,494 4,600,789 17,004,094 12,713,134 31,707,982 4,522,234 15,231,111 54,071,362
2022-07-19 2,302,426 4,654,608 17,293,572 12,943,925 32,282,787 4,579,172 15,451,616 54,922,893
2022-07-20 2,308,357 4,541,891 16,164,102 12,064,972 30,109,353 4,440,881 14,659,191 51,871,036
2022-07-21 2,314,283 4,594,897 16,462,420 12,300,701 30,656,094 4,475,843 14,873,591 52,707,451
2022-07-22 2,320,158 4,814,899 17,895,651 13,453,091 33,456,953 4,705,050 15,965,139 56,833,830
2022-07-23 2,326,054 4,760,241 18,101,892 13,624,463 33,857,863 4,649,961 15,665,354 56,801,911
2022-07-24 2,332,160 4,699,896 17,488,406 13,117,666 32,606,522 4,533,161 15,273,937 55,113,065
2022-07-25 2,338,259 4,415,077 16,087,545 12,061,702 29,996,096 4,314,988 14,167,661 51,046,974
2022-07-26 2,338,496 4,280,171 15,611,022 11,703,212 29,104,572 4,255,015 8,962,849 44,812,270
2022-07-28 2,355,349 4,752,147 17,611,606 13,217,603 32,855,587 4,595,754 15,370,299 55,547,409
2022-07-29 2,360,978 4,373,710 17,281,153 13,031,490 32,309,347 4,211,101 14,970,691 53,868,145
2022-07-30 2,366,635 4,217,418 17,075,165 12,908,493 31,605,750 4,047,720 15,053,012 53,301,808
2022-07-31 2,372,202 4,265,438 17,325,280 13,078,858 32,034,724 4,091,559 15,375,873 54,137,008
2022-08-01 2,377,806 4,231,613 17,337,366 13,111,847 32,104,382 4,100,519 15,077,147 53,858,492
2022-08-02 2,383,360 4,168,626 16,846,319 12,637,990 30,907,164 4,028,164 14,763,044 52,444,144
2022-08-03 2,388,999 4,266,922 16,845,788 12,584,565 30,766,344 4,116,550 15,056,475 52,870,300
2022-08-04 2,394,583 4,245,978 16,582,011 12,496,079 30,473,179 4,083,661 14,542,594 51,950,324
2022-08-05 2,400,226 4,374,150 17,271,584 13,026,958 31,639,326 4,209,954 15,058,939 53,941,586
2022-08-06 2,406,084 4,657,330 18,318,847 13,825,605 33,478,000 4,491,874 16,325,714 57,619,371
2022-08-07 2,411,957 4,616,498 17,969,891 13,605,464 32,893,173 4,455,754 15,978,289 56,625,895
2022-08-08 2,417,831 4,678,720 19,277,119 14,918,809 32,364,974 4,648,239 17,256,887 60,779,774
2022-08-09 2,423,819 4,456,376 18,055,303 13,974,889 30,196,551 4,430,876 16,076,088 56,993,532
2022-08-10 2,429,866 4,498,889 18,685,680 14,479,237 31,453,905 4,483,723 16,746,255 58,893,784
2022-08-11 2,435,795 4,387,932 18,086,927 14,009,586 30,363,931 4,360,414 16,103,094 56,947,953
2022-08-12 2,441,583 4,358,777 18,165,485 14,074,106 30,418,555 4,368,982 16,066,806 57,034,156
2022-08-13 2,447,671 4,389,801 18,360,670 14,185,871 30,542,837 4,365,042 16,208,627 57,510,010
2022-08-14 2,453,431 3,980,861 17,607,787 13,640,596 29,444,343 3,957,170 15,276,823 54,463,236
2022-08-15 2,459,363 3,922,074 17,217,838 13,310,891 28,728,218 3,880,282 15,173,016 53,504,101
2022-08-16 2,465,132 3,816,667 16,841,011 13,012,986 28,058,698 3,788,862 14,543,791 52,003,317
2022-08-17 2,470,878 3,761,199 16,069,024 12,405,591 27,337,059 3,724,087 13,802,840 49,762,741
2022-08-18 2,476,517 3,640,723 15,487,026 11,918,369 26,260,616 3,616,825 13,433,472 48,096,414
2022-08-19 2,482,075 3,379,057 14,282,898 11,029,513 24,345,268 3,359,297 12,160,462 44,211,228
2022-08-20 2,487,703 3,382,776 14,222,294 10,972,672 24,224,995 3,354,055 12,066,321 43,998,118
2022-08-21 2,493,452 3,459,237 14,961,116 11,515,713 25,432,736 3,483,780 12,794,048 46,213,894
2022-08-22 2,499,351 3,471,911 14,598,263 11,271,810 25,199,206 3,478,263 11,987,621 44,807,868
2022-08-23 2,505,037 3,354,372 14,443,494 11,065,585 24,905,540 3,338,723 12,060,635 44,262,809
2022-08-24 2,505,384 3,194,138 14,273,947 10,935,776 24,613,376 3,314,615 0 31,718,476

Row

Sources and Notes

Please click on the Source Code link at the top of the document to see the full source code. Here is a summary:

dexTVL

  • sum of tvlUSD from the xx function in the subscanr package for R. You can also use the Karura-dex project hosted on Subquery Network with this query:
{ 
  dailyPools { 
    nodes { 
      timestamp token0 {id} token1 {id} feeRateUSD dailyTradeVolumeUSD totalTVL txCount updateAtBlock {id}  
    } 
  } 
}

LPTokenStakingTVL

  • ACA (or KAR) obtained from the py-substrate-interface using function substrate.query(module=‘Rewards’,storage_function=‘PoolInfos’, block_hash = hash)
  • mulitplied by ACA (or KAR) price for the specific block number

BridgeTVL

  • KSM (or DOT) obtained from the py-substrate-interface using function substrate.query(module=‘Tokens’,storage_function=‘TotalIssuance’, params = [{‘Token’: ‘KSM’}], block_hash = hash)
  • LKSM (or LDOT) obtained from function substrate.query(module=‘Tokens’,storage_function=‘TotalIssuance’, params = [{‘Token’: ‘LKSM’}], block_hash = hash)
  • both mulitplied by KSM (or DOT) price for the specific block number

liquidStakingTVL

  • KSM (or DOT) obtained from the py-substrate-interface using function substrate.query(module=‘Homa’,storage_function=‘TotalStakingBonded’, block_hash = hash)
  • mulitplied by KSM (or DOT) price for the specific block number

lcdotTVL (Acala only)

  • LCDOT obtained from the py-substrate-interface using function substrate.query(module=‘Tokens’,storage_function=‘TotalIssuance’, params = [{‘LiquidCrowdloan’: 13}], block_hash = hash)
  • mulitplied by DOT price for the specific block number

stableCoinTVL

{ 
  dailyCollaterals { 
    nodes { 
      collateral {id} depositAmount debitAmount depositVolumeUSD debitVolumeUSD
      depositChangedUSD debitChangedUSD debitExchangeRate timestamp txCount 
    } 
  } 
}
---
title: "Acala / Karura TVL Dashboard"
output:
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: scroll
    social: menu
    source_code: embed
params:
  window: 7
  
---

```{css custom1, echo=FALSE}
.dataTables_scrollBody {
    max-height: 100% !important;
}
```

```{r global, include=FALSE}
library(knitr)
knitr::opts_chunk$set(
  message = FALSE,
  warning = FALSE,
  comment = "#>"
)

library(ggplot2)
library(kableExtra)
library(formattable)
library(lubridate)
library(flexdashboard)
library(DT)
library(subscanr)
library(formattable)
library(ghql)
x <- GraphqlClient$new()

# Helper function to concat
`%+%` <- function(a, b) paste0(a, b)

window = params$window
# window <- today() - as.Date("2021-12-31") + 1
# network = params$network

# Liquidity Pool TVL ($3.72M) = totalDefiTvl = totalDexTvl + totalDexLockedTvl + homaLocked + stableCoinTvl
a_dex <- getDailyPools_acala_dex('acala', window) %>%
  setorder(Date, pair)
k_dex <- getDailyPools_acala_dex('karura', window) %>%
  setorder(Date, pair)

a_dailyTVL <- a_dex[, .(max(updateAtBlock.id), sum(tvlUSD)), by = Date] %>%
  setnames(c("V1","V2"), c("Block","dexTVL"))
k_dailyTVL <- k_dex[, .(max(updateAtBlock.id), sum(tvlUSD)), by = Date] %>%
  setnames(c("V1","V2"), c("Block","dexTVL"))

library(reticulate)
# use_python("/opt/homebrew/bin/python3.9")
```

```{python, include=FALSE}
from substrateinterface import SubstrateInterface

import pandas as pd

def getTotalIssuanceKSM():
    url = 'wss://karura.polkawallet.io'
    substrate = SubstrateInterface(url)
    hash = substrate.get_block_hash(block_id)
    timestamp = substrate.query(module='Timestamp',storage_function='Now',block_hash=hash).value
  
    # Issuance
    ksm = substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'Token': 'KSM'}], block_hash = hash)
    lksm = substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'Token': 'LKSM'}], block_hash = hash)
    result = substrate.query('AcalaOracle', 'Values', params = [{'Token': 'KSM'}], block_hash = hash)
  
    # homa = substrate.query(module='Homa',storage_function='TotalStakingBonded', block_hash = hash)
    try:
        homa = substrate.query_map(module='Homa',storage_function='StakingLedgers', block_hash = hash)
        amount = 0
        for res in homa:
            amount += res[1].value['bonded']
            
        # LKSM to KSM ratio
        ratio = lksm.value / amount 

    except:
        amount = 0
        # LKSM to KSM ratio
        ratio = 8.5
    
    # Build price DataFrame
    p = substrate.query('AcalaOracle', 'Values', params = [{'Token': 'KSM'}], block_hash = hash)
    price = p.value['value'] / 10**18
  
    bridge = (float(ksm.value / 10**12) + float(lksm.value / 10**12 / ratio)) * price
    liquidKSM = float(amount / 10**12) * price
    crowdloanTVL = (501137661910050505 / 10**12) * price
    return [bridge, liquidKSM, crowdloanTVL, block_id, ratio]

def getOraclePrices():
    if r.network=="Karura":
        url = 'wss://karura.polkawallet.io'
    else:
        url = 'wss://acala-rpc-0.aca-api.network'
      
    substrate = SubstrateInterface(url)
    hash = substrate.get_block_hash(block_id)
    timestamp = substrate.query(module='Timestamp',storage_function='Now',block_hash=hash).value
    p = substrate.query_map('AcalaOracle', 'Values', block_hash = hash)
    data = []
    for res in p:
        outi = {"token": str(res[0].value), "price": res[1].value['value'] / 10**18}
        data.append(outi)
    
    out = pd.DataFrame(data)
    return out
 
 
def getRewards():
    if r.network=="Karura":
        url = 'wss://karura.polkawallet.io'
    else:
        url = 'wss://acala-rpc-0.aca-api.network'
      
    substrate = SubstrateInterface(url)
    hash = substrate.get_block_hash(block_id)
    timestamp = substrate.query(module='Timestamp',storage_function='Now',block_hash=hash).value
  
    data = []
    rewards = substrate.query_map(module='Rewards',storage_function='PoolInfos', block_hash = hash)
    for res in rewards:
        if res[0][0] == 'Dex':
            pair = res[0].value['Dex']['DexShare']
            lp = substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'DexShare': pair}], block_hash = hash)
            legs = substrate.query(module='Dex',storage_function='LiquidityPool', params = [pair], block_hash = hash)
            outi = {"pair0": str(pair[0]), "pair1": str(pair[1]), "lp": str(lp.value), "leg0": str(legs[0].value), "leg1": str(legs[1].value)}
            data.append(outi)
    
    out = pd.DataFrame(data)
    return out

def getTotalIssuanceDOT():
    url = 'wss://acala-rpc-0.aca-api.network'
    substrate = SubstrateInterface(url)
    hash = substrate.get_block_hash(block_id)
    timestamp = substrate.query(module='Timestamp',storage_function='Now',block_hash=hash).value
  
    # Total Issuance data
    dot = substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'Token': 'DOT'}], block_hash = hash)
    ldot = substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'Token': 'LDOT'}], block_hash = hash)
    lcdot = substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'LiquidCrowdloan': 13}], block_hash = hash)
    
    # homa = substrate.query(module='Homa',storage_function='TotalStakingBonded', block_hash = hash)
    try:
        homa = substrate.query_map(module='Homa',storage_function='StakingLedgers', block_hash = hash)
        amount = 0
        for res in homa:
            amount += res[1].value['bonded']
            
        # LKSM to KSM ratio
        ratio = ldot.value / amount 

    except:
        amount = 0
        # LDOT to DOT ratio
        ratio = 10
    
    # Build price DataFrame
    tmp = []
    p = substrate.query_map('AcalaOracle', 'Values', block_hash = hash)
    outi = {"id": {'Token': 'AUSD'}, "price": 1}
    tmp.append(outi)
    for res in p:
      outi = {"id": res[0].value, "price": res[1].value['value'] / 10**18}
      tmp.append(outi)
      if res[0].value=={'Token': 'DOT'}:
        outi = {"id": {'LiquidCrowdloan': 13}, "price": res[1].value['value'] / 10**18 / 1.4}
        tmp.append(outi)
        outi = {"id": {'Token': 'LDOT'}, "price": res[1].value['value'] / 10**18 / ratio}
        tmp.append(outi)
  
    # Price lookup function
    p = substrate.query('AcalaOracle', 'Values', params = [{'Token': 'DOT'}], block_hash = hash)
    price = p.value['value'] / 10**18
    
    # Decimals lookup function
    tmp = [{'id': {'Token': 'ACA'}, 'decimals': 12}, {'id': {'Token': 'DOT'}, 'decimals': 10}, {'id': {'Token': 'LDOT'}, 'decimals': 10}, {'id': {'LiquidCrowdloan': 13}, 'decimals': 10}, {'id': {'Token': 'AUSD'}, 'decimals': 12}]
    decimals = pd.DataFrame(tmp)
    def getDecimals(token):
      return int(decimals[decimals['id'] == token]['decimals'])        
  
    if block_id < 497258:
      bridge = (float(dot.value / 10**10 - 198000000) + float(ldot.value / 10**10 / ratio)) * price
    else:
      bridge = (float(dot.value / 10**10) + float(ldot.value / 10**10 / ratio)) * price
    liquidDOT = float(amount / 10**10) * price
    lcDOT = float(lcdot.value / 10**10) * price
    crowdloanTVL = (325159802323576263 / 10**10) * price
    return [bridge, liquidDOT, crowdloanTVL, lcDOT, block_id, ratio]

```



```{r tvl, cache = TRUE, include=FALSE}

network = 'acala'
# dailyTVL[, M := month(Date) %+% year(Date)]
# dailyTVL[, maxDate := max(Date), by = M]
# dailyTVL <- dailyTVL[Date == maxDate]

# LP Token Staking TVL = totalDexTvl = useTotalDexPoolTVL()
# totalDexLockedTvl = useTotalStaking() = api.query.dex?.liquidityPool
# KSM Bridge TVL = totalIssuanceKSM = useTotalIssuance('KSM') = api.query.tokens?.totalIssuance
a_dailyTVL[, bridgeTVL := 0]
# Liquid KSM TVL = totalLocked in Homa = useState()
a_dailyTVL[, liquidStakingTVL := 0]
# homeLocked = totalStaking * price
a_dailyTVL[, crowdloanTVL := 0]
a_dailyTVL[, LPTokenStakingTVL := 0]
a_dailyTVL[, lcdotTVL := 0]

for (i in 1:nrow(a_dailyTVL)) {
  py_run_string("block_id = " %+% a_dailyTVL$Block[i])
  if (tolower(network) == "karura") {
    tmp = py$getTotalIssuanceKSM()
  } else {
    tmp = py$getTotalIssuanceDOT()
    a_dailyTVL$lcdotTVL[i] <- tmp[4]
  }
  a_dailyTVL$bridgeTVL[i] <- tmp[1]
  a_dailyTVL$liquidStakingTVL[i] <- tmp[2]
  a_dailyTVL$crowdloanTVL[i] <- tmp[3]

  # LPTokenStakingTVL 
  rewards <- py$getRewards() %>%
    as.data.table
  # sort(unique(c(rewards$pair0, rewards$pair1)))
  rewards[, pair0 := fixToken(pair0, network)]
  rewards[, pair1 := fixToken(pair1, network)]
  rewards <- merge(rewards, tokens, by.x = 'pair0', by.y="Token")
  setnames(rewards, "decimals", "decimals0")
  rewards[, Name := NULL]
  rewards <- merge(rewards, tokens, by.x = 'pair1', by.y="Token")
  setnames(rewards, "decimals", "decimals1")
  rewards[, Name := NULL]
  rewards[, decimals0 := as.numeric(decimals0)]
  rewards[, decimals1 := as.numeric(decimals1)]
  rewards[, lpDecimals := 12]
  rewards[pair0=='DOT' & pair1=='LCDOT', lpDecimals := 10]
  rewards[, lp := as.numeric(lp) / 10**lpDecimals]
  rewards[, leg0 := as.numeric(leg0) / 10**decimals0]
  rewards[, leg1 := as.numeric(leg1) / 10**decimals1]
  
  price = py$getOraclePrices() %>%
    as.data.table
  price[, token := fixToken(token, network)]
  
  rewards <- merge(rewards, price, by.x = "pair0", by.y="token", all.x = TRUE)
  setnames(rewards, "price", "price0")
  rewards <- merge(rewards, price, by.x = "pair1", by.y="token", all.x = TRUE)
  setnames(rewards, "price", "price1")
  rewards[pair0 %in% c('KUSD', "AUSD"), price0 := 1]
  rewards[pair1 %in% c('KUSD', "AUSD"), price1 := 1]
  rewards[, tvl := leg0 * price0 + leg1 * price1]
  rewards[is.na(tvl), tvl := (leg0 * price0) * 2]
  rewards[is.na(tvl), tvl := (leg1 * price1) * 2]
  rewards[, lpPrice := tvl / lp]  
  a_dailyTVL$LPTokenStakingTVL[i] <- sum(rewards$tvl, na.rm = TRUE)

}

# stableCoinTvl
# const stableCoinTVL = useTotalLocked(); = api.query.loans?.totalPositions
a_collateral <- getLoansDailyCollateral_acala_loan(network, window, staging = FALSE) %>%
  setorder(Date, collateral.id)
a_stableCoinTvl <- a_collateral[, sum(depositVolumeUSD), by = Date] %>%
  setnames("V1", "stableCoinTVL")
a_dailyTVL <- merge(a_dailyTVL, a_stableCoinTvl, by = "Date", all.x = TRUE)

# If monthly, remove these fields
# try(dailyTVL[, M := NULL])
# try(dailyTVL[, maxDate := NULL])

# Make columns numeric
for (col in names(a_dailyTVL)[-1]) set(a_dailyTVL, j=col, value=as.numeric(a_dailyTVL[[col]])) 
a_dailyTVL[, OverallTVL := dexTVL + LPTokenStakingTVL + bridgeTVL + liquidStakingTVL + lcdotTVL + stableCoinTVL]

history <- fread(file = "Acala_TVL.csv")
history[, Date := as.Date(Date)]
minDate <- min(a_dailyTVL$Date)
comb <- rbind(history[Date < minDate], a_dailyTVL)
fwrite(x = comb, file = "Acala_TVL.csv")
a_dailyTVL <- comb



## Karura
network <- 'Karura'
# dailyTVL[, M := month(Date) %+% year(Date)]
# dailyTVL[, maxDate := max(Date), by = M]
# dailyTVL <- dailyTVL[Date == maxDate]

# LP Token Staking TVL = totalDexTvl = useTotalDexPoolTVL()
# totalDexLockedTvl = useTotalStaking() = api.query.dex?.liquidityPool
# KSM Bridge TVL = totalIssuanceKSM = useTotalIssuance('KSM') = api.query.tokens?.totalIssuance
k_dailyTVL[, bridgeTVL := 0]
# Liquid KSM TVL = totalLocked in Homa = useState()
k_dailyTVL[, liquidStakingTVL := 0]
# homeLocked = totalStaking * price
k_dailyTVL[, crowdloanTVL := 0]
k_dailyTVL[, LPTokenStakingTVL := 0]
# k_dailyTVL[, lcdotTVL := 0]

for (i in 1:nrow(k_dailyTVL)) {
  py_run_string("block_id = " %+% k_dailyTVL$Block[i])
  if (tolower(network) == "karura") {
    tmp = py$getTotalIssuanceKSM()
  } else {
    tmp = py$getTotalIssuanceDOT()
    a_dailyTVL$lcdotTVL[i] <- tmp[4]
  }
  k_dailyTVL$bridgeTVL[i] <- tmp[1]
  k_dailyTVL$liquidStakingTVL[i] <- tmp[2]
  k_dailyTVL$crowdloanTVL[i] <- tmp[3]
  
  # LPTokenStakingTVL 
  rewards <- py$getRewards() %>%
    as.data.table
  # sort(unique(c(rewards$pair0, rewards$pair1)))
  rewards[, pair0 := fixToken(pair0, network)]
  rewards[, pair1 := fixToken(pair1, network)]
  rewards <- merge(rewards, tokens, by.x = 'pair0', by.y="Token")
  setnames(rewards, "decimals", "decimals0")
  rewards[, Name := NULL]
  rewards <- merge(rewards, tokens, by.x = 'pair1', by.y="Token")
  setnames(rewards, "decimals", "decimals1")
  rewards[, Name := NULL]
  rewards[, decimals0 := as.numeric(decimals0)]
  rewards[, decimals1 := as.numeric(decimals1)]
  rewards[, lpDecimals := 12]
  rewards[pair0=='DOT' & pair1=='LCDOT', lpDecimals := 10]
  rewards[, lp := as.numeric(lp) / 10**lpDecimals]
  rewards[, leg0 := as.numeric(leg0) / 10**decimals0]
  rewards[, leg1 := as.numeric(leg1) / 10**decimals1]
  
  price = py$getOraclePrices() %>%
    as.data.table
  price[, token := fixToken(token, network)]
  
  rewards <- merge(rewards, price, by.x = "pair0", by.y="token", all.x = TRUE)
  setnames(rewards, "price", "price0")
  rewards <- merge(rewards, price, by.x = "pair1", by.y="token", all.x = TRUE)
  setnames(rewards, "price", "price1")
  rewards[pair0 %in% c('KUSD', "AUSD"), price0 := 1]
  rewards[pair1 %in% c('KUSD', "AUSD"), price1 := 1]
  rewards[, tvl := leg0 * price0 + leg1 * price1]
  rewards[is.na(tvl), tvl := (leg0 * price0) * 2]
  rewards[is.na(tvl), tvl := (leg1 * price1) * 2]
  rewards[, lpPrice := tvl / lp]  
  k_dailyTVL$LPTokenStakingTVL[i] <- sum(rewards$tvl, na.rm = TRUE)

}

# stableCoinTvl
# const stableCoinTVL = useTotalLocked(); = api.query.loans?.totalPositions
k_collateral <- getLoansDailyCollateral_acala_loan(network, window, staging = FALSE) %>%
  setorder(Date, collateral.id)
k_stableCoinTvl <- k_collateral[, sum(depositVolumeUSD), by = Date] %>%
  setnames("V1", "stableCoinTVL")
k_dailyTVL <- merge(k_dailyTVL, k_stableCoinTvl, by = "Date", all.x = TRUE)

# If monthly, remove these fields
# try(dailyTVL[, M := NULL])
# try(dailyTVL[, maxDate := NULL])

# Make columns numeric
for (col in names(k_dailyTVL)[-1]) set(k_dailyTVL, j=col, value=as.numeric(k_dailyTVL[[col]])) 
if (tolower(network) == "acala") {
  k_dailyTVL[, OverallTVL := dexTVL + LPTokenStakingTVL + bridgeTVL + liquidStakingTVL + lcdotTVL + stableCoinTVL]
} else {
  k_dailyTVL[, OverallTVL := dexTVL + LPTokenStakingTVL + bridgeTVL + liquidStakingTVL + stableCoinTVL]
}

# k_dailyTVL[, lcdotTVL := NULL]

history <- fread(file = "Karura_TVL.csv")
history[, Date := as.Date(Date)]
minDate <- min(k_dailyTVL$Date)
comb <- rbind(history[Date < minDate], k_dailyTVL)
fwrite(x = comb, file = "Karura_TVL.csv")
k_dailyTVL <- comb

```

# Acala {.tabset}

Row
----

### Components of Total Value Locked: Acala

```{r a_plot1}

a_dat <- melt(data = a_dailyTVL[, .(Date, dexTVL, LPTokenStakingTVL, bridgeTVL, liquidStakingTVL, lcdotTVL, stableCoinTVL)], 
            id.vars = "Date",
            value.name = "TVL")
cols <- c('dexTVL', 'LPTokenStakingTVL', 'bridgeTVL', 'liquidStakingTVL', 'LCDOTTVL', 'stableCoinTVL')
a_dat[, TVL := TVL / 1e6]
 
# Stacked
ggplot(a_dat, aes(fill=variable, y=TVL, x=Date)) + 
    geom_bar(position="stack", stat="identity") +
    ggtitle(label="Components of Total Value Locked for Acala") + 
    ylab("Totval Value Locked (in millions USD)")

```

Row
----

### Overall Total Value Locked (TVL) for Acala

* The Overall TVL in the table below does not includes the Crowdloan TVL, which also seems to be the case on the https://stats.acala.network page.

```{r a_tvl}

knitr::kable(a_dailyTVL, escape = FALSE, format.args = list(big.mark = ",")) %>%
  kable_styling()

```

# Karura {.tabset}

Row
----

### Components of Total Value Locked: Karura

```{r k_plot1}

k_dat <- melt(data = k_dailyTVL[, .(Date, dexTVL, LPTokenStakingTVL, bridgeTVL, liquidStakingTVL, stableCoinTVL)], 
            id.vars = "Date",
            value.name = "TVL")
cols <- c('dexTVL', 'LPTokenStakingTVL', 'bridgeTVL', 'liquidStakingTVL', 'stableCoinTVL')
k_dat[, TVL := TVL / 1e6]
 
# Stacked
ggplot(k_dat, aes(fill=variable, y=TVL, x=Date)) + 
    geom_bar(position="stack", stat="identity") +
    ggtitle(label="Components of Total Value Locked for Karura") + 
    ylab("Totval Value Locked (in millions USD)")

```

Row
----

### Overall Total Value Locked (TVL) for Karura

* The Overall TVL in the table below does not includes the Crowdloan TVL, which also seems to be the case on the https://stats.karura.network page.

```{r k_tvl}

knitr::kable(k_dailyTVL, escape = FALSE, format.args = list(big.mark = ",")) %>%
  kable_styling()

```

Row
----

### Sources and Notes

Please click on the *Source Code* link at the top of the document to see the full source code.  Here is a summary:

#### dexTVL 

- sum of tvlUSD from the xx function in the [subscanr](https://github.com/rogerjbos/subscanr) package for R.  You can also use the [Karura-dex](https://explorer.subquery.network/subquery/AcalaNetwork/karura-dex) project hosted on Subquery Network with this query:
```
{ 
  dailyPools { 
    nodes { 
      timestamp token0 {id} token1 {id} feeRateUSD dailyTradeVolumeUSD totalTVL txCount updateAtBlock {id}  
    } 
  } 
}
```

#### LPTokenStakingTVL
- ACA (or KAR) obtained from the [py-substrate-interface](https://github.com/polkascan/py-substrate-interface) using function *substrate.query(module='Rewards',storage_function='PoolInfos', block_hash = hash)*
- mulitplied by ACA (or KAR) price for the specific block number

#### BridgeTVL
- KSM (or DOT) obtained from the [py-substrate-interface](https://github.com/polkascan/py-substrate-interface) using function *substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'Token': 'KSM'}], block_hash = hash)*
- LKSM (or LDOT) obtained from function *substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'Token': 'LKSM'}], block_hash = hash)*
- both mulitplied by KSM (or DOT) price for the specific block number

#### liquidStakingTVL
- KSM (or DOT) obtained from the [py-substrate-interface](https://github.com/polkascan/py-substrate-interface) using function *substrate.query(module='Homa',storage_function='TotalStakingBonded', block_hash = hash)*
- mulitplied by KSM (or DOT) price for the specific block number

#### lcdotTVL (Acala only)
- LCDOT obtained from the [py-substrate-interface](https://github.com/polkascan/py-substrate-interface) using function *substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'LiquidCrowdloan': 13}], block_hash = hash)*
- mulitplied by DOT price for the specific block number

#### stableCoinTVL
- sum of depositVolumeUSD from the *getLoansDailyCollateral_acala_loan* function in the [subscanr](https://github.com/rogerjbos/subscanr) package for R.  You can also use the [Karura-loan]https://explorer.subquery.network/subquery/AcalaNetwork/karura-loan) project hosted on Subquery Network with this query:
```
{ 
  dailyCollaterals { 
    nodes { 
      collateral {id} depositAmount debitAmount depositVolumeUSD debitVolumeUSD
      depositChangedUSD debitChangedUSD debitExchangeRate timestamp txCount 
    } 
  } 
}
```